사이트 내 전체검색
PHP
[mysql] 데이타를 시간별 날짜별로 뽑아오는 쿼리문!
로빈아빠
https://cmd.kr/php/402 URL이 복사되었습니다.

본문

//데이타의 저장날짜가 datetime의 now()로 저장됐다고 했을때로 가정.

select count(*) from counter
where count_wdate
BETWEEN concat(date_format(DATE_ADD(now(),interval -1 day),'%Y-%m-%d'), ' 00:00:00')
and concat(date_format(DATE_ADD(now(),interval  -1 day),'%Y-%m-%d'), ' 23:59:59')

댓글목록

등록된 댓글이 없습니다.

PHP
871 (11/18P)

Search

Copyright © Cmd 명령어 3.144.18.4